/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.admin.service;

import org.springblade.modules.admin.dto.erp.serivce.PartnerCloudPartsListDTO;
import org.springblade.modules.admin.entity.PartsInfo;
import org.springblade.modules.admin.vo.PartsInfoVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * 配件信息表 服务类
 *
 * @author ysq
 * @since 2023-08-09
 */
public interface IPartsInfoService extends BaseService<PartsInfo> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param partsInfo
	 * @return
	 */
	IPage<PartsInfoVO> selectPartsInfoPage(IPage<PartsInfoVO> page, PartsInfoVO partsInfo);

	/**
	 * 新增/编辑
	 * @param partsInfo
	 * @return
	 */
	boolean submit(PartsInfo partsInfo);

	/**
	 * 批量删除
	 * @param ids
	 * @return
	 */
	boolean batchRemoveParts(List<Long> ids);

	/**
	 * 下载导入模板
	 * @param response
	 */
    void downElevatorTemplate(HttpServletResponse response);

	/**
	 * 上传导入
	 * @param file
	 * @return
	 */
    Map<String, Object> uploadExcel(MultipartFile file);

	/**
	 * 下载导入错误数据
	 * @param response
	 */
	void downErrExcel(HttpServletResponse response);

	/**
	 * 导出数据
	 * @param partsInfo
	 * @param response
	 */
	void exportExcel(PartsInfoVO partsInfo, HttpServletResponse response) throws IOException;

	List<PartnerCloudPartsListDTO> selectPartsList();
}
